using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VLAAUF
    {
        public DataRow Convert2LAAUF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryLAAUF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["LAMANDANT"] = " ".PadRight(2 ); 
         dwReturn["LAAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["LAAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["LAAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["LAKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["LALIEFKD"] = " ".PadRight(8 ); 
         dwReturn["LASTA"] = " ".PadRight(2 ); 
         dwReturn["LAKDDAT"] = " ".PadRight(0 ); 
         dwReturn["LALIEFDAT"] = " ".PadRight(0 ); 
         dwReturn["LAWERK"] = " ".PadRight(3 ); 
         dwReturn["LAABT"] = " ".PadRight(3 ); 
         dwReturn["LAFARBE"] = " ".PadRight(10 ); 
         dwReturn["LAFRBKL"] = " ".PadRight(3 ); 
         dwReturn["LAPRGRP"] = " ".PadRight(1 ); 
         dwReturn["LAPLANKZ1"] = " ".PadRight(1 ); 
         dwReturn["LAAGANG1"] = " ".PadRight(15 ); 
         dwReturn["LAAFO1"] = " ".PadRight(3 ); 
         dwReturn["LAEVARHNR1"] = " ".PadRight(2 ); 
         dwReturn["LAEVARUNR1"] = " ".PadRight(2 ); 
         dwReturn["LAMTYP1"] = " ".PadRight(8 ); 
         dwReturn["LAFILLER11"] = " ".PadRight(2 ); 
         dwReturn["LAREZART1"] = " ".PadRight(1 ); 
         dwReturn["LAREZNR1"] = " ".PadRight(10 ); 
         dwReturn["LAREZST1"] = " ".PadRight(1 ); 
         dwReturn["LAAEVOR1"] = " ".PadRight(4 ); 
         dwReturn["LAMODNR1"] = " ".PadRight(3 ); 
         dwReturn["LAEINSTNR1"] = " ".PadRight(3 ); 
         dwReturn["LAPFLKZ1"] = " ".PadRight(1 ); 
         dwReturn["LADRUCKKZ1"] = " ".PadRight(1 ); 
         dwReturn["LARUEKZ1"] = " ".PadRight(1 ); 
         dwReturn["LAPLANKZ2"] = " ".PadRight(1 ); 
         dwReturn["LAAGANG2"] = " ".PadRight(15 ); 
         dwReturn["LAAFO2"] = " ".PadRight(3 ); 
         dwReturn["LAEVARHNR2"] = " ".PadRight(2 ); 
         dwReturn["LAEVARUNR2"] = " ".PadRight(2 ); 
         dwReturn["LAMTYP2"] = " ".PadRight(8 ); 
         dwReturn["LAFILLER12"] = " ".PadRight(2 ); 
         dwReturn["LAREZART2"] = " ".PadRight(1 ); 
         dwReturn["LAREZNR2"] = " ".PadRight(10 ); 
         dwReturn["LAREZST2"] = " ".PadRight(1 ); 
         dwReturn["LAAEVOR2"] = " ".PadRight(4 ); 
         dwReturn["LAMODNR2"] = " ".PadRight(3 ); 
         dwReturn["LAEINSTNR2"] = " ".PadRight(3 ); 
         dwReturn["LAPFLKZ2"] = " ".PadRight(1 ); 
         dwReturn["LADRUCKKZ2"] = " ".PadRight(1 ); 
         dwReturn["LARUEKZ2"] = " ".PadRight(1 ); 
         dwReturn["LAPLANKZ3"] = " ".PadRight(1 ); 
         dwReturn["LAAGANG3"] = " ".PadRight(15 ); 
         dwReturn["LAAFO3"] = " ".PadRight(3 ); 
         dwReturn["LAEVARHNR3"] = " ".PadRight(2 ); 
         dwReturn["LAEVARUNR3"] = " ".PadRight(2 ); 
         dwReturn["LAMTYP3"] = " ".PadRight(8 ); 
         dwReturn["LAFILLER13"] = " ".PadRight(2 ); 
         dwReturn["LAREZART3"] = " ".PadRight(1 ); 
         dwReturn["LAREZNR3"] = " ".PadRight(10 ); 
         dwReturn["LAREZST3"] = " ".PadRight(1 ); 
         dwReturn["LAAEVOR3"] = " ".PadRight(4 ); 
         dwReturn["LAMODNR3"] = " ".PadRight(3 ); 
         dwReturn["LAEINSTNR3"] = " ".PadRight(3 ); 
         dwReturn["LAPFLKZ3"] = " ".PadRight(1 ); 
         dwReturn["LADRUCKKZ3"] = " ".PadRight(1 ); 
         dwReturn["LARUEKZ3"] = " ".PadRight(1 ); 
         dwReturn["LAMERKM1"] = " ".PadRight(3 ); 
         dwReturn["LASAFO1"] = " ".PadRight(3 ); 
         dwReturn["LASAFO2"] = " ".PadRight(3 ); 
         dwReturn["LASAFO3"] = " ".PadRight(3 ); 
         dwReturn["LAFILLER2"] = " ".PadRight(17 ); 
         dwReturn["LAAENZL"] = " ".PadRight(0 ); 
         dwReturn["LAAENB"] = " ".PadRight(8 ); 
         dwReturn["LAAEND"] = " ".PadRight(0 ); 
         dwReturn["LANEUB"] = " ".PadRight(8 ); 
         dwReturn["LANEUD"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapLAAUF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveLAAUF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryLAAUF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapLAAUF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertLAAUF(dwLocal, ITXDBVERSION);
            }
            UpdateLAAUF(dwLocal);
        }
        public void InsertLAAUF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO LAAUF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryLAAUF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM LAAUF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM LAAUF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "LAAUF";
            Return = Result;
            return Return;
        }
        public void DeleteLAAUF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM LAAUF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateLAAUF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE LAAUF SET "
                    +"LAMANDANT= :LAMANDANT,"
                    +"LAAUFKRS= :LAAUFKRS,"
                    +"LAAUFLFD= :LAAUFLFD,"
                    +"LAAUFPOS= :LAAUFPOS,"
                    +"LAKUNDNR= :LAKUNDNR,"
                    +"LALIEFKD= :LALIEFKD,"
                    +"LASTA= :LASTA,"
                    +"LAKDDAT= :LAKDDAT,"
                    +"LALIEFDAT= :LALIEFDAT,"
                    +"LAWERK= :LAWERK,"
                    +"LAABT= :LAABT,"
                    +"LAFARBE= :LAFARBE,"
                    +"LAFRBKL= :LAFRBKL,"
                    +"LAPRGRP= :LAPRGRP,"
                    +"LAPLANKZ1= :LAPLANKZ1,"
                    +"LAAGANG1= :LAAGANG1,"
                    +"LAAFO1= :LAAFO1,"
                    +"LAEVARHNR1= :LAEVARHNR1,"
                    +"LAEVARUNR1= :LAEVARUNR1,"
                    +"LAMTYP1= :LAMTYP1,"
                    +"LAFILLER11= :LAFILLER11,"
                    +"LAREZART1= :LAREZART1,"
                    +"LAREZNR1= :LAREZNR1,"
                    +"LAREZST1= :LAREZST1,"
                    +"LAAEVOR1= :LAAEVOR1,"
                    +"LAMODNR1= :LAMODNR1,"
                    +"LAEINSTNR1= :LAEINSTNR1,"
                    +"LAPFLKZ1= :LAPFLKZ1,"
                    +"LADRUCKKZ1= :LADRUCKKZ1,"
                    +"LARUEKZ1= :LARUEKZ1,"
                    +"LAPLANKZ2= :LAPLANKZ2,"
                    +"LAAGANG2= :LAAGANG2,"
                    +"LAAFO2= :LAAFO2,"
                    +"LAEVARHNR2= :LAEVARHNR2,"
                    +"LAEVARUNR2= :LAEVARUNR2,"
                    +"LAMTYP2= :LAMTYP2,"
                    +"LAFILLER12= :LAFILLER12,"
                    +"LAREZART2= :LAREZART2,"
                    +"LAREZNR2= :LAREZNR2,"
                    +"LAREZST2= :LAREZST2,"
                    +"LAAEVOR2= :LAAEVOR2,"
                    +"LAMODNR2= :LAMODNR2,"
                    +"LAEINSTNR2= :LAEINSTNR2,"
                    +"LAPFLKZ2= :LAPFLKZ2,"
                    +"LADRUCKKZ2= :LADRUCKKZ2,"
                    +"LARUEKZ2= :LARUEKZ2,"
                    +"LAPLANKZ3= :LAPLANKZ3,"
                    +"LAAGANG3= :LAAGANG3,"
                    +"LAAFO3= :LAAFO3,"
                    +"LAEVARHNR3= :LAEVARHNR3,"
                    +"LAEVARUNR3= :LAEVARUNR3,"
                    +"LAMTYP3= :LAMTYP3,"
                    +"LAFILLER13= :LAFILLER13,"
                    +"LAREZART3= :LAREZART3,"
                    +"LAREZNR3= :LAREZNR3,"
                    +"LAREZST3= :LAREZST3,"
                    +"LAAEVOR3= :LAAEVOR3,"
                    +"LAMODNR3= :LAMODNR3,"
                    +"LAEINSTNR3= :LAEINSTNR3,"
                    +"LAPFLKZ3= :LAPFLKZ3,"
                    +"LADRUCKKZ3= :LADRUCKKZ3,"
                    +"LARUEKZ3= :LARUEKZ3,"
                    +"LAMERKM1= :LAMERKM1,"
                    +"LASAFO1= :LASAFO1,"
                    +"LASAFO2= :LASAFO2,"
                    +"LASAFO3= :LASAFO3,"
                    +"LAFILLER2= :LAFILLER2,"
                    +"LAAENZL= :LAAENZL,"
                    +"LAAENB= :LAAENB,"
                    +"LAAEND= :LAAEND,"
                    +"LANEUB= :LANEUB,"
                    +"LANEUD= :LANEUD,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("LAMANDANT", OracleType.NVarChar).Value = dwData["LAMANDANT"].ToString(); 
          or1.Parameters.Add("LAAUFKRS", OracleType.NVarChar).Value = dwData["LAAUFKRS"].ToString(); 
          or1.Parameters.Add("LAAUFLFD", OracleType.NVarChar).Value = dwData["LAAUFLFD"].ToString(); 
          or1.Parameters.Add("LAAUFPOS", OracleType.NVarChar).Value = dwData["LAAUFPOS"].ToString(); 
          or1.Parameters.Add("LAKUNDNR", OracleType.NVarChar).Value = dwData["LAKUNDNR"].ToString(); 
          or1.Parameters.Add("LALIEFKD", OracleType.NVarChar).Value = dwData["LALIEFKD"].ToString(); 
          or1.Parameters.Add("LASTA", OracleType.NVarChar).Value = dwData["LASTA"].ToString(); 
          or1.Parameters.Add("LAKDDAT", OracleType.NVarChar).Value = dwData["LAKDDAT"].ToString(); 
          or1.Parameters.Add("LALIEFDAT", OracleType.NVarChar).Value = dwData["LALIEFDAT"].ToString(); 
          or1.Parameters.Add("LAWERK", OracleType.NVarChar).Value = dwData["LAWERK"].ToString(); 
          or1.Parameters.Add("LAABT", OracleType.NVarChar).Value = dwData["LAABT"].ToString(); 
          or1.Parameters.Add("LAFARBE", OracleType.NVarChar).Value = dwData["LAFARBE"].ToString(); 
          or1.Parameters.Add("LAFRBKL", OracleType.NVarChar).Value = dwData["LAFRBKL"].ToString(); 
          or1.Parameters.Add("LAPRGRP", OracleType.NVarChar).Value = dwData["LAPRGRP"].ToString(); 
          or1.Parameters.Add("LAPLANKZ1", OracleType.NVarChar).Value = dwData["LAPLANKZ1"].ToString(); 
          or1.Parameters.Add("LAAGANG1", OracleType.NVarChar).Value = dwData["LAAGANG1"].ToString(); 
          or1.Parameters.Add("LAAFO1", OracleType.NVarChar).Value = dwData["LAAFO1"].ToString(); 
          or1.Parameters.Add("LAEVARHNR1", OracleType.NVarChar).Value = dwData["LAEVARHNR1"].ToString(); 
          or1.Parameters.Add("LAEVARUNR1", OracleType.NVarChar).Value = dwData["LAEVARUNR1"].ToString(); 
          or1.Parameters.Add("LAMTYP1", OracleType.NVarChar).Value = dwData["LAMTYP1"].ToString(); 
          or1.Parameters.Add("LAFILLER11", OracleType.NVarChar).Value = dwData["LAFILLER11"].ToString(); 
          or1.Parameters.Add("LAREZART1", OracleType.NVarChar).Value = dwData["LAREZART1"].ToString(); 
          or1.Parameters.Add("LAREZNR1", OracleType.NVarChar).Value = dwData["LAREZNR1"].ToString(); 
          or1.Parameters.Add("LAREZST1", OracleType.NVarChar).Value = dwData["LAREZST1"].ToString(); 
          or1.Parameters.Add("LAAEVOR1", OracleType.NVarChar).Value = dwData["LAAEVOR1"].ToString(); 
          or1.Parameters.Add("LAMODNR1", OracleType.NVarChar).Value = dwData["LAMODNR1"].ToString(); 
          or1.Parameters.Add("LAEINSTNR1", OracleType.NVarChar).Value = dwData["LAEINSTNR1"].ToString(); 
          or1.Parameters.Add("LAPFLKZ1", OracleType.NVarChar).Value = dwData["LAPFLKZ1"].ToString(); 
          or1.Parameters.Add("LADRUCKKZ1", OracleType.NVarChar).Value = dwData["LADRUCKKZ1"].ToString(); 
          or1.Parameters.Add("LARUEKZ1", OracleType.NVarChar).Value = dwData["LARUEKZ1"].ToString(); 
          or1.Parameters.Add("LAPLANKZ2", OracleType.NVarChar).Value = dwData["LAPLANKZ2"].ToString(); 
          or1.Parameters.Add("LAAGANG2", OracleType.NVarChar).Value = dwData["LAAGANG2"].ToString(); 
          or1.Parameters.Add("LAAFO2", OracleType.NVarChar).Value = dwData["LAAFO2"].ToString(); 
          or1.Parameters.Add("LAEVARHNR2", OracleType.NVarChar).Value = dwData["LAEVARHNR2"].ToString(); 
          or1.Parameters.Add("LAEVARUNR2", OracleType.NVarChar).Value = dwData["LAEVARUNR2"].ToString(); 
          or1.Parameters.Add("LAMTYP2", OracleType.NVarChar).Value = dwData["LAMTYP2"].ToString(); 
          or1.Parameters.Add("LAFILLER12", OracleType.NVarChar).Value = dwData["LAFILLER12"].ToString(); 
          or1.Parameters.Add("LAREZART2", OracleType.NVarChar).Value = dwData["LAREZART2"].ToString(); 
          or1.Parameters.Add("LAREZNR2", OracleType.NVarChar).Value = dwData["LAREZNR2"].ToString(); 
          or1.Parameters.Add("LAREZST2", OracleType.NVarChar).Value = dwData["LAREZST2"].ToString(); 
          or1.Parameters.Add("LAAEVOR2", OracleType.NVarChar).Value = dwData["LAAEVOR2"].ToString(); 
          or1.Parameters.Add("LAMODNR2", OracleType.NVarChar).Value = dwData["LAMODNR2"].ToString(); 
          or1.Parameters.Add("LAEINSTNR2", OracleType.NVarChar).Value = dwData["LAEINSTNR2"].ToString(); 
          or1.Parameters.Add("LAPFLKZ2", OracleType.NVarChar).Value = dwData["LAPFLKZ2"].ToString(); 
          or1.Parameters.Add("LADRUCKKZ2", OracleType.NVarChar).Value = dwData["LADRUCKKZ2"].ToString(); 
          or1.Parameters.Add("LARUEKZ2", OracleType.NVarChar).Value = dwData["LARUEKZ2"].ToString(); 
          or1.Parameters.Add("LAPLANKZ3", OracleType.NVarChar).Value = dwData["LAPLANKZ3"].ToString(); 
          or1.Parameters.Add("LAAGANG3", OracleType.NVarChar).Value = dwData["LAAGANG3"].ToString(); 
          or1.Parameters.Add("LAAFO3", OracleType.NVarChar).Value = dwData["LAAFO3"].ToString(); 
          or1.Parameters.Add("LAEVARHNR3", OracleType.NVarChar).Value = dwData["LAEVARHNR3"].ToString(); 
          or1.Parameters.Add("LAEVARUNR3", OracleType.NVarChar).Value = dwData["LAEVARUNR3"].ToString(); 
          or1.Parameters.Add("LAMTYP3", OracleType.NVarChar).Value = dwData["LAMTYP3"].ToString(); 
          or1.Parameters.Add("LAFILLER13", OracleType.NVarChar).Value = dwData["LAFILLER13"].ToString(); 
          or1.Parameters.Add("LAREZART3", OracleType.NVarChar).Value = dwData["LAREZART3"].ToString(); 
          or1.Parameters.Add("LAREZNR3", OracleType.NVarChar).Value = dwData["LAREZNR3"].ToString(); 
          or1.Parameters.Add("LAREZST3", OracleType.NVarChar).Value = dwData["LAREZST3"].ToString(); 
          or1.Parameters.Add("LAAEVOR3", OracleType.NVarChar).Value = dwData["LAAEVOR3"].ToString(); 
          or1.Parameters.Add("LAMODNR3", OracleType.NVarChar).Value = dwData["LAMODNR3"].ToString(); 
          or1.Parameters.Add("LAEINSTNR3", OracleType.NVarChar).Value = dwData["LAEINSTNR3"].ToString(); 
          or1.Parameters.Add("LAPFLKZ3", OracleType.NVarChar).Value = dwData["LAPFLKZ3"].ToString(); 
          or1.Parameters.Add("LADRUCKKZ3", OracleType.NVarChar).Value = dwData["LADRUCKKZ3"].ToString(); 
          or1.Parameters.Add("LARUEKZ3", OracleType.NVarChar).Value = dwData["LARUEKZ3"].ToString(); 
          or1.Parameters.Add("LAMERKM1", OracleType.NVarChar).Value = dwData["LAMERKM1"].ToString(); 
          or1.Parameters.Add("LASAFO1", OracleType.NVarChar).Value = dwData["LASAFO1"].ToString(); 
          or1.Parameters.Add("LASAFO2", OracleType.NVarChar).Value = dwData["LASAFO2"].ToString(); 
          or1.Parameters.Add("LASAFO3", OracleType.NVarChar).Value = dwData["LASAFO3"].ToString(); 
          or1.Parameters.Add("LAFILLER2", OracleType.NVarChar).Value = dwData["LAFILLER2"].ToString(); 
          or1.Parameters.Add("LAAENZL", OracleType.NVarChar).Value = dwData["LAAENZL"].ToString(); 
          or1.Parameters.Add("LAAENB", OracleType.NVarChar).Value = dwData["LAAENB"].ToString(); 
          or1.Parameters.Add("LAAEND", OracleType.NVarChar).Value = dwData["LAAEND"].ToString(); 
          or1.Parameters.Add("LANEUB", OracleType.NVarChar).Value = dwData["LANEUB"].ToString(); 
          or1.Parameters.Add("LANEUD", OracleType.NVarChar).Value = dwData["LANEUD"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
